<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="./js/vue.js"></script>
    <title>Document</title>
</head>

<body>
    <div id="app">
        <ul>
            <li v-for="(item,index) in provinces" :key="index">
                <p>{{item.name}}----{{index}}</p>
                <ol>
                    <li v-for="(l,i) in item.cities" :key="i">
                        {{l.name}} --{{i}}
                    </li>
                </ol>
            </li>
        </ul>
        <hr>
        <ul v-for="(value,item,index) in cars" :key="index">
            <li>序号:{{index+1}}</li>
            <li>{{item}}</li>
            <li>品牌:{{value.brand}}</li>
            <li>型号:{{value.model}}</li>
            <li>颜色:{{value.color}}</li>

        </ul>
        <hr>
        <h3 v-for="(value,key,index) in object" :key="index">
            <!-- <h3 v-for="(value,key,index) in object" :key="index"> -->
            {{index}} -- {{key}}:{{value}}
        </h3>
        <!-- <h3 v-for="(value,key,index) in object" :key="index">
            {{index}} {{key}}:{{value}}
        </h3> -->
    </div>
</body>
<script>
    var provinces = [{
        name: "浙江",
        cities: [{
            name: '金华',
        }, {
            name: '杭州'
        }, {
            name: '温州'
        },]
    }, {
        name: "湖北",
        cities: [{
            name: '武汉'
        }, {
            name: '襄樊'
        }, {
            name: '黄冈'
        },]
    }, {
        name: "江苏",
        cities: [{
            name: '南京'
        }, {
            name: '徐州'
        }, {
            name: '连云港'
        },]
    }];
    var cars = {
        car01: { brand: "Ford", model: "Mustang", color: "red" },
        car02: { brand: "Fiat", model: "500", color: "white" },
        car03: { brand: "Volvo", model: "XC90", color: "black" }
    }
    const vm = new Vue({
        el: "#app",
        data: {
            provinces,
            cars,
            object: {
                title: 'How to do lists in Vue',
                author: 'Jane Doe',
                publishedAt: '2016-04-10'
            },
        },

    })
</script>

</html>